<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
          const shopCartList = [
        {
          cartInfoList: [
            {
              skuNum: 1,
              skuPrice: 1299,
            },
            {
              skuNum: 3,
              skuPrice: 777,
            },
            {
              skuNum: 2,
              skuPrice: 900,
            },
          ],
        },

        {
          cartInfoList: [
            {
              skuNum: 2,
              skuPrice: 420,
            },
            {
              skuNum: 4,
              skuPrice: 99,
            },
          ],
        },

        {
          cartInfoList: [
            {
              skuNum: 4,
              skuPrice: 420,
            },
            {
              skuNum: 4,
              skuPrice: 99,
            },
          ],
        },
      ];


      const result = shopCartList.reduce((p,c)=>{

        const re = c.cartInfoList.reduce((p1,c1)=>{
          return p1 + c1.skuNum
        },0)

        return re + p
      },0)
      console.log(result,'re');
  </script>
</body>
</html>